3.559 \(\int \frac{x^{-1-\frac{n}{2}}}{a+b x^n+c x^{2 n}} \, dx\)

Optimal. Leaf size=205 \[ \frac{\sqrt{2} \left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{a^{3/2} n \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{2} \left (\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}+b\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{a^{3/2} n \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{2 x^{-n/2}}{a n} \]

[Out]

-2/(a*n*x^(n/2)) + (Sqrt[2]*(b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[a])/(Sqrt[b - Sqrt[b^2
- 4*a*c]]*x^(n/2))])/(a^(3/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]*n) + (Sqrt[2]*(b + (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*
ArcTan[(Sqrt[2]*Sqrt[a])/(Sqrt[b + Sqrt[b^2 - 4*a*c]]*x^(n/2))])/(a^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]*n)

________________________________________________________________________________________

Rubi [A]  time = 0.395062, antiderivative size = 205, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.192, Rules used = {1381, 1340, 1122, 1166, 205} \[ \frac{\sqrt{2} \left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{a^{3/2} n \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{2} \left (\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}+b\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{a^{3/2} n \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{2 x^{-n/2}}{a n} \]

Antiderivative was successfully verified.

[In]

Int[x^(-1 - n/2)/(a + b*x^n + c*x^(2*n)),x]

[Out]

-2/(a*n*x^(n/2)) + (Sqrt[2]*(b - (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[a])/(Sqrt[b - Sqrt[b^2
- 4*a*c]]*x^(n/2))])/(a^(3/2)*Sqrt[b - Sqrt[b^2 - 4*a*c]]*n) + (Sqrt[2]*(b + (b^2 - 2*a*c)/Sqrt[b^2 - 4*a*c])*
ArcTan[(Sqrt[2]*Sqrt[a])/(Sqrt[b + Sqrt[b^2 - 4*a*c]]*x^(n/2))])/(a^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]*n)

Rule 1381

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/(m + 1), Subst[Int[(a +
b*x^Simplify[n/(m + 1)] + c*x^Simplify[(2*n)/(m + 1)])^p, x], x, x^(m + 1)], x] /; FreeQ[{a, b, c, m, n, p}, x
] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IntegerQ[Simplify[n/(m + 1)]] &&  !IntegerQ[n]

Rule 1340

Int[((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[x^(2*n*p)*(c + b/x^n + a/x^(2*n))^p,
x] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && LtQ[n, 0] && IntegerQ[p]

Rule 1122

Int[((d_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[(d^3*(d*x)^(m - 3)*(a + b*
x^2 + c*x^4)^(p + 1))/(c*(m + 4*p + 1)), x] - Dist[d^4/(c*(m + 4*p + 1)), Int[(d*x)^(m - 4)*Simp[a*(m - 3) + b
*(m + 2*p - 1)*x^2, x]*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b^2 - 4*a*c, 0] && Gt
Q[m, 3] && NeQ[m + 4*p + 1, 0] && IntegerQ[2*p] && (IntegerQ[p] || IntegerQ[m])

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{x^{-1-\frac{n}{2}}}{a+b x^n+c x^{2 n}} \, dx &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{a+\frac{c}{x^4}+\frac{b}{x^2}} \, dx,x,x^{-n/2}\right )}{n}\\ &=-\frac{2 \operatorname{Subst}\left (\int \frac{x^4}{c+b x^2+a x^4} \, dx,x,x^{-n/2}\right )}{n}\\ &=-\frac{2 x^{-n/2}}{a n}+\frac{2 \operatorname{Subst}\left (\int \frac{c+b x^2}{c+b x^2+a x^4} \, dx,x,x^{-n/2}\right )}{a n}\\ &=-\frac{2 x^{-n/2}}{a n}+\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \operatorname{Subst}\left (\int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+a x^2} \, dx,x,x^{-n/2}\right )}{a n}+\frac{\left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \operatorname{Subst}\left (\int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+a x^2} \, dx,x,x^{-n/2}\right )}{a n}\\ &=-\frac{2 x^{-n/2}}{a n}+\frac{\sqrt{2} \left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{a^{3/2} \sqrt{b-\sqrt{b^2-4 a c}} n}+\frac{\sqrt{2} \left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{a^{3/2} \sqrt{b+\sqrt{b^2-4 a c}} n}\\ \end{align*}

Mathematica [C]  time = 0.203583, size = 127, normalized size = 0.62 \[ \frac{4 c x^{-n/2} \left (\frac{\, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )}{-b \sqrt{b^2-4 a c}-4 a c+b^2}+\frac{\, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{b \sqrt{b^2-4 a c}-4 a c+b^2}\right )}{n} \]

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 - n/2)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(4*c*(Hypergeometric2F1[-1/2, 1, 1/2, (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]/(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])
+ Hypergeometric2F1[-1/2, 1, 1/2, (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]/(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c])))/(n
*x^(n/2))

________________________________________________________________________________________

Maple [C]  time = 0.201, size = 268, normalized size = 1.3 \begin{align*} -2\,{\frac{1}{an{x}^{n/2}}}+\sum _{{\it \_R}={\it RootOf} \left ( \left ( 16\,{a}^{5}{c}^{2}{n}^{4}-8\,{a}^{4}{b}^{2}c{n}^{4}+{a}^{3}{b}^{4}{n}^{4} \right ){{\it \_Z}}^{4}+ \left ( 12\,{a}^{2}b{c}^{2}{n}^{2}-7\,a{b}^{3}c{n}^{2}+{b}^{5}{n}^{2} \right ){{\it \_Z}}^{2}+{c}^{3} \right ) }{\it \_R}\,\ln \left ({x}^{{\frac{n}{2}}}+ \left ( -8\,{\frac{{a}^{5}{n}^{3}{c}^{2}}{a{c}^{3}-{b}^{2}{c}^{2}}}+6\,{\frac{{n}^{3}{b}^{2}{a}^{4}c}{a{c}^{3}-{b}^{2}{c}^{2}}}-{\frac{{n}^{3}{b}^{4}{a}^{3}}{a{c}^{3}-{b}^{2}{c}^{2}}} \right ){{\it \_R}}^{3}+ \left ( -5\,{\frac{{a}^{2}b{c}^{2}n}{a{c}^{3}-{b}^{2}{c}^{2}}}+5\,{\frac{a{b}^{3}cn}{a{c}^{3}-{b}^{2}{c}^{2}}}-{\frac{{b}^{5}n}{a{c}^{3}-{b}^{2}{c}^{2}}} \right ){\it \_R} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1-1/2*n)/(a+b*x^n+c*x^(2*n)),x)

[Out]

-2/a/n/(x^(1/2*n))+sum(_R*ln(x^(1/2*n)+(-8/(a*c^3-b^2*c^2)*n^3*a^5*c^2+6/(a*c^3-b^2*c^2)*n^3*b^2*a^4*c-1/(a*c^
3-b^2*c^2)*n^3*b^4*a^3)*_R^3+(-5/(a*c^3-b^2*c^2)*n*b*a^2*c^2+5/(a*c^3-b^2*c^2)*n*b^3*a*c-1/(a*c^3-b^2*c^2)*n*b
^5)*_R),_R=RootOf((16*a^5*c^2*n^4-8*a^4*b^2*c*n^4+a^3*b^4*n^4)*_Z^4+(12*a^2*b*c^2*n^2-7*a*b^3*c*n^2+b^5*n^2)*_
Z^2+c^3))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{2}{a n x^{\frac{1}{2} \, n}} - \int \frac{c x^{\frac{3}{2} \, n} + b x^{\frac{1}{2} \, n}}{a c x x^{2 \, n} + a b x x^{n} + a^{2} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-1/2*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

-2/(a*n*x^(1/2*n)) - integrate((c*x^(3/2*n) + b*x^(1/2*n))/(a*c*x*x^(2*n) + a*b*x*x^n + a^2*x), x)

________________________________________________________________________________________

Fricas [B]  time = 1.99945, size = 2527, normalized size = 12.33 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-1/2*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

1/2*(sqrt(2)*a*n*sqrt(-((a^3*b^2 - 4*a^4*c)*n^2*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) +
b^3 - 3*a*b*c)/((a^3*b^2 - 4*a^4*c)*n^2))*log(-(4*(b^2*c - a*c^2)*x*x^(-1/2*n - 1) + sqrt(2)*((a^3*b^3 - 4*a^4
*b*c)*n^3*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) - (b^4 - 5*a*b^2*c + 4*a^2*c^2)*n)*sqrt(
-((a^3*b^2 - 4*a^4*c)*n^2*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) + b^3 - 3*a*b*c)/((a^3*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(-(4*
(b^2*c - a*c^2)*x*x^(-1/2*n - 1) - sqrt(2)*((a^3*b^3 - 4*a^4*b*c)*n^3*sqrt((b^4 - 2*a*b^2*c + a^2*c^2)/((a^6*b
^2 - 4*a^7*c)*n^4)) + (b^4 - 5*a*b^2*c + 4*a^2*c^2)*n)*sqrt(((a^3*b^2 - 4*a^4*c)*n^2*sqrt((b^4 - 2*a*b^2*c + a
^2*c^2)/((a^6*b^2 - 4*a^7*c)*n^4)) - b^3 + 3*a*b*c)/((a^3*b^2 - 4*a^4*c)*n^2)))/x) - 4*x*x^(-1/2*n - 1))/(a*n)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1-1/2*n)/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{-\frac{1}{2} \, n - 1}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1-1/2*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

integrate(x^(-1/2*n - 1)/(c*x^(2*n) + b*x^n + a), x)